from django.shortcuts import render
from rest_framework import generics

from homepage_app.models import HomePage,FeatureService
from homepage_app.serializer import HomePageSerializer,FeatureServiceSerializer

# Create your views here.
class HomePageView(generics.ListAPIView):
    '''轮播图''' #id倒序排列
    queryset = HomePage.objects.all().order_by('-id')
    serializer_class = HomePageSerializer

class FeatureServiceView(generics.ListAPIView):
    '''服务特色列表'''
    queryset = FeatureService.objects.all().order_by('-id')
    serializer_class = FeatureServiceSerializer
